Skip to content

test: add e2e test for OpenCensus to OpenTelemetry metrics migration#1735

Open
khrm wants to merge 2 commits into
tektoncd:mainfrom
khrm:e2e-otel-metrics-test
Open

test: add e2e test for OpenCensus to OpenTelemetry metrics migration#1735
khrm wants to merge 2 commits into
tektoncd:mainfrom
khrm:e2e-otel-metrics-test

Conversation

@khrm

@khrm khrm commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Adds TestOTelMetrics, a consolidated e2e test for the OC→OTel metrics migration in Chains (PR #1550). The test creates a TaskRun and a PipelineRun, waits for Chains to sign them, then scrapes the controller /metrics endpoint via port-forward to assert:

  • All signing counters increment (sign_created, payload_stored, marked_signed) for both TaskRun and PipelineRun
  • Knative workqueue metrics use the new kn_workqueue_* prefix
  • Standard go_* runtime metrics are present
  • Old OpenCensus metric names (tekton_chains_*) are absent

Uses expfmt/dto.MetricFamily for proper Prometheus text parsing and a baseline scrape before creating resources to compute deltas, avoiding false positives from earlier test runs.

Relates to #1550

Changes

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Has Docs included if any changes are user facing
  • Has Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

NONE

@tekton-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign enarha after the PR has been reviewed.
You can assign the PR to them by writing /assign @enarha in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 29, 2026
@khrm khrm force-pushed the e2e-otel-metrics-test branch 5 times, most recently from 73f1a37 to 292afe2 Compare June 30, 2026 15:43
khrm and others added 2 commits June 30, 2026 21:28
Adds TestOTelMetrics, a consolidated e2e test for the OC→OTel metrics
migration in Chains (PR tektoncd#1550).

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
ko v0.19.0 introduced strict enforcement that kodata symlinks must not
resolve outside the kodata root (ko-build/ko#1619).

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@khrm khrm force-pushed the e2e-otel-metrics-test branch from 292afe2 to e521dd8 Compare June 30, 2026 15:58
Comment thread test/metrics_otel_test.go
Comment on lines +237 to +240
removedMetrics := []string{
"tekton_chains_taskrun_signed_total",
"tekton_chains_pipelinerun_signed_total",
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably remove these, these metrics never existed I believe. This will pass in all cases.

@jkhelil

jkhelil commented Jul 2, 2026

Copy link
Copy Markdown
Member

/retest

@jkhelil

jkhelil commented Jul 2, 2026

Copy link
Copy Markdown
Member

/ok-to-test

@jkhelil

jkhelil commented Jul 3, 2026

Copy link
Copy Markdown
Member

/retest

@jkhelil

jkhelil commented Jul 3, 2026

Copy link
Copy Markdown
Member

@khrm e2e are failing, can you have a look please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants